<#include "/tags/userAvatar.ftl">
<#include "/tags/DDMMYYYY.ftl">
<#include "/tags/likeTag.ftl">
<#include "/tags/likeListTag.ftl">
<#include "/tags/cheerTag.ftl">
<#include "/tags/entryAvatar.ftl">
<#include "/tags/commentPackageTag.ftl">

<#macro viewEntry title goalId goalTitle youLikeThis youCheerThis likeCount cheerCount commentCount 
		imgURL entryUpdatedSince ownerName body entryId createdDate goalCreatedDate comments
		createdMonth createdYear ownerAvatar='/images/avatar.png'>
	
	<div class="avatar">
		<@userAvatar username=ownerName avatar=ownerAvatar imgHeight="74" imgWidth="74"/>
	</div>
	<div class="goalEntryContainer">
	<div class="entryPostTitle" style="padding-top:0px">
    	<span class="goalEntryName"><b>${rc.getMessage("page.dashboard.goal")}:</b> <a href="${rc.contextPath}/goal/view/${goalId}">${goalTitle}</a></span>
        <label>${rc.getMessage("page.dashboard.goalCreatedDate")}: <b>${goalCreatedDate}</b> </label>
    </div>
	<p class="userPostIt">Gửi bởi: <a href="/${ownerName}">${ownerName}</a></p>
    <div class="entryContentEditor">
    	<@entryAvatar url=imgURL alt=title id=entryId />
    	<h1><a href="${rc.contextPath}/entry/view/${entryId}">${title}</a></h1>
    	<p class="text">${body}</p>
        <!--p class="text readmore"><a href="#">[ĐỌC THÊM]</a></p-->        
    </div>
    <@commentsPkg componentId=entryId component="GOAL_ENTRY" commentCount=commentCount likeCount=likeCount youLikeThis=youLikeThis
				  comments=comments showEditComponent="on" showCommentInput="on" showLikeButton="on" entryOwner=ownerName/>
	</div>
</#macro>